#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int removeDuplicates(int* nums, int numsSize)
{
    int slow = 0;
    int fast = 1;

    while (fast < numsSize)
    {
        if (nums[fast] != nums[slow])
        {
            nums[++slow] = nums[fast++];
        }
        else
        {
            fast++;
        }
    }
    return slow + 1;
}
int main()
{
    int nums[3] = { 1,1,2 };
    int re = removeDuplicates(nums, 3);
    printf("%d ", re);
    printf("\n");
    for (int i = 0; i < 2; i++)
    {
        printf("%d ", nums[i]);
    }
    return 0;
}